#!/bin/bash
## filename: addusers_for_C-style.sh
# 成批添加10个用户

for (( n=1; n<=10; n++ ))
do
    if ((n<10))
    then  st="st0${n}" 
    else  st="st${n}"
    fi
    sudo useradd -m -s /bin/bash $st
    echo "$st:ubuntu@sias123"|sudo chpasswd
    sudo chage -d 0 $st
done

